package org.ydeity.lucene.test.entity;

import lombok.Data;
import org.ansj.lucene7.AnsjAnalyzer;
import org.apache.lucene.index.IndexWriterConfig;
import org.springframework.data.annotation.Id;
import org.ydeity.lucene.annotation.*;

import java.math.BigDecimal;
import java.time.LocalDate;
import java.time.LocalDateTime;
import java.util.Date;

@Data
@LuceneDocument(coreName = "content",openMode = IndexWriterConfig.OpenMode.CREATE_OR_APPEND,analyzerType = AnsjAnalyzer.TYPE.dic_ansj)
public class POI {

    @Id
    private Long id;

    @LuceneField(type= FieldType.Text)
    private String name;

    private String explainPoints;

    private String level;

    @LuceneField(type=FieldType.Text)
    private String type;

    private String indoorScene;

    private double lon;

    private Double lat;

    private String state;

    private String country;

    private String province;

    private String city;

    private String region;

    private String address;

    private String appStatus;

    @LuceneField(type=FieldType.GEO)
    @GeoSpatialIndexed
    private String location;

    private Short status;

    private short shortStatus;

    private Integer poiType;

    private Boolean open;

    private boolean openStatus;

    private long num;

    private BigDecimal bigDecimal;

    private Date date;

    private LocalDateTime localDateTime;

    private LocalDate localDate;
}